var { initObj, formatObj } = require('../libs/common');

var init = function (data) {
    return initObj(mod, data);
}

var format = function (data) {
    return formatObj(mod, data);
}

// 公众号关注用户
var mod = {
    openid: {
        name: '公众号openid',
        type: 'string',
        length: 50
    },
    unionid: {
        name: '微信平台用户标识id',
        type: 'string',
        length: 50
    },
    fllow: {
        name: '是否关注',
        type: Number,
        default: 0
    },
    timestamp: {
        name: '时间戳',
        type: 'string'
    },
    createtime: {
        name: '创建时间',
        type: 'date',
        default: new Date()
    },
    updatetime: {
        name: '更新时间',
        type: 'date',
        default: new Date()
    }
};

module.exports = {
    init,
    format
};